<!DOCTYPE html>
<html>
<head>
	<title>首页</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="" />
	<style>
		#soft1,#soft2,#soft3,#soft4{
			opacity: 0.7;
		}
	</style>
	<script type="application/x-javascript">
		addEventListener("load", function () {
			setTimeout(hideURLbar, 0);
		}, false);

		function hideURLbar() {
			window.scrollTo(0, 1);
		}
	</script>
	<link href="students/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all" />
	<link href="students/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all" />
	<link href="students/css/chromagallery.css" rel="stylesheet" type="text/css" media="all" />
	<link href="students/css/style.css" rel="stylesheet" type="text/css" media="all" />
	<script src="students/js/modernizr.custom.js"></script>
</head>

<body id="index.php" data-spy="scroll" data-target=".navbar" data-offset="60">
	<?php
	session_start(); 
	require_once("./congfig/config.php");
	require_once("./lib/common.php");
	 ?>
	<!-- Top Bar -->
	<section class="top-bar">
		<div class="container">
			<div class="row">
				<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
					<a href="index.php" class="logo">
						<h1>Neusoft</h1>
					</a>
				</div>
			</div>
		</div>
	</section>
	<!-- /Top Bar -->
	<!-- Navigation Bar -->
	<div class="navbar-wrapper">
		<div class="container">
			<nav class="navbar navbar-inverse navbar-static-top cl-effect-21">
				<div class="container">
					<div id="navbar" class="navbar-collapse collapse">
						<ul class="nav navbar-nav">
							<li class="active"><a href="#">首页</a></li>
							<li><a href="project-center.php">项目中心</a></li>
							<li><a href="project-teacher.php">指导教师</a></li>
							<li><a href="#About Us">关于我们</a></li>
							<li><?php 
							if(isset($_SESSION['rank'])){
							if ($_SESSION['rank']==null) {  ?>
								<a href="login.php" style="font-size:13px;margin-left: 100px;">登陆/注册</a>
							<?php  
						     }
						     elseif ($_SESSION['rank']==0){ ?>
							 <a href="students/owner-myProject.php" style="font-size:13px;margin-left: 100px;">学生：个人中心</a>
							<?php 
						    }
							 
							 elseif ($_SESSION['rank']==1){ ?>
							 <a href="teacher/project-list.php" style="font-size:13px;margin-left: 100px;">老师：个人中心</a>
							<?php 
						    }
							 
							 elseif ($_SESSION['rank']==2){ ?>
							 <a href="admin/project-list.php" style="font-size:13px;margin-left: 100px;">管理员中心</a>
							<?php 
						    }
						}//end of isset
						else{?>
							<a href="login.php" style="font-size:13px;margin-left: 100px;">登陆/注册</a>
						<?php }
							 ?>
								
							</li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
	</div>

	<div id="myCarousel" class="carousel slide" data-ride="carousel">
		<!-- Indicators -->
		<ol class="carousel-indicators">
			<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
			<li data-target="#myCarousel" data-slide-to="1"></li>
			<li data-target="#myCarousel" data-slide-to="2"></li>
		</ol>
		<div class="carousel-inner" role="listbox">
			<div class="item active">
				<img class="first-slide" src="students/images/soft1.jpg" alt="First slide" id="soft1">
				<div class="container">
					<div class="carousel-caption">

					</div>
				</div>
			</div>
			<div class="item">
				<img class="second-slide" src="students/images/soft2.jpg" alt="Second slide" id="soft2">
				<div class="container">
					<div class="carousel-caption">

					</div>
				</div>
			</div>
			<div class="item">
				<img class="third-slide" src="students/images/soft3.jpg" alt="Third slide" id="soft3">
				<div class="container">
					<div class="carousel-caption">

					</div>
				</div>
			</div>
		</div>
		<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
			<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
			<span class="sr-only">Previous</span>
		</a>
		<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
			<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
			<span class="sr-only">Next</span>
		</a>
	</div><!-- /.carousel -->
	<!-- /Banner Section -->
	<!-- About Section -->
	<?php 
	$sql="select * from users where rank = 1 limit 0,4";   
    $result=$conn->query($sql);
	 ?>
	<section class="about-us" id="about">
		<h3 class="text-center slideanim">指导教师</h3>
		<p class="text-center slideanim">faculty teacher.<a href="project-teacher.php">更多</a></p>
		<div class="container">
			<div class="row">
				<?php
                while ($row=$result->fetch_array()) {
                    $uid=$row["uid"];
                    $sql1="select * from userinfor where uid = $uid";
                    $result1=$conn->query($sql1);
                    $row1=$result1->fetch_array();
                    ?>
                    <div class="col-lg-6 col-md-6">
					<div class="about-details">
						<div class="row">
							<div class="col-sm-2 col-xs-12">
								<img src="students/images/tx.png" class="img-responsive slideanim" alt="about-img">
							</div>
							<div class="col-sm-10 col-xs-12">
								<div class="about-info slideanim">
									<p style="font-weight:600"><?php echo $row1['realname'] ?></p>
									<p style="font-size:13px;"><?php echo $row1['phone'] ?></p>
									<p style="font-size:13px;"><?php echo $row['email'] ?></p>
								</div>
							</div>
						</div>
					</div>
				</div>
                <?php 
                            } 
                 ?>
				
			</div>
		</div>
	</section>
	<!-- /About Section -->

	<!-- Our Services -->
	<?php 
	$sql="select * from goodpro  limit 0,4";   
    $result=$conn->query($sql);
	 ?>
	<section class="our-services" id="services">
		<h3 class="text-center slideanim">优秀项目展示</h3>
		<p class="text-center slideanim">Excellent project presentation.<a href="project-center.php">更多</a></p>
		<div class="container">
			<div class="row">
			<?php
                while ($row=$result->fetch_array()) {
                    $pid=$row["pid"];
					// $sql1="select * from userinfor where uid = $uid";
					$sql1 = "SELECT * FROM `proinfor` where id = '$pid' ORDER BY `proinfor`.`pDate` DESC";
                    $result1=$conn->query($sql1);
                    $row1=$result1->fetch_array();
                    ?>
				<div class="col-lg-6 col-md-6">
					<div class="serv-details">
						<div class="row">
							<div class="col-sm-6 col-xs-6">
								<img src="students/images/serv-img1.jpg" alt="" class="img-responsive slideanim">
							</div>
							<div class="col-sm-6 col-xs-6">
								<div class="serv-img-details slideanim">
									<h4><?php echo $row1['pName']?></h4>
									<p><?php echo $row1['pName']?></p>
								</div>
							</div>
						</div>
					</div>
					<div class="serv-info slideanim">
						<p><?php echo $row1['pDesc']?>
							</p>
					</div>
				</div>
				<?php 
                            } 
                ?>
				
			</div>
			<!-- <div class="row">
				<div class="col-lg-6 col-md-6">
					<div class="serv-details">
						<div class="row">
							<div class="col-sm-6 col-xs-6">
								<img src="students/images/serv-img3.jpg" alt="" class="img-responsive slideanim">
							</div>
							<div class="col-sm-6 col-xs-6">
								<div class="serv-img-details slideanim">
									<h4>食堂快捷订餐系统app</h4>
									<p>Lorem Ipsum</p>
								</div>
							</div>
						</div>
					</div>
					<div class="serv-info slideanim">
						<p>
							互联网正改变人们的生活，它让人们的出行活动更加便利。

							我研究小组所讨论的“食堂快捷订餐app ”已一致通过建议。

							这款移动端app属于一款简单操作、功能强大的软件，一方面减少学生的排队等餐时间，

							而另一方面也为商家提供收益的最新财务报表。

							它可以模仿市场上相似订餐软件，实时处理接受、退订、误餐索赔等一系列流程。

							它的特点就是方便身处在大连东软信息学院的在校生
						</p>
					</div>
				</div>
				<div class="col-lg-6 col-md-6">
					<div class="serv-details">
						<div class="row">
							<div class="col-sm-6 col-xs-6">
								<img src="students/images/serv-img4.jpg" alt="" class="img-responsive slideanim">
							</div>
							<div class="col-sm-6 col-xs-6">
								<div class="serv-img-details slideanim">
									<h4>“谈个好老师”</h4>
									<p>Lorem Ipsum</p>
								</div>
							</div>
						</div>
					</div>
					<div class="serv-info slideanim">
						<p>
							教育及特长学习是当今所有家长所重度关注的问题，那么找个好老师对孩子的成长尤为重要，预期目标：本项目将会实现推送同城范围内各行各业各课程的相关老师及其本人资料（前提是已本网站注册的老师）、以及课程预约时间，家长级学生根据自己的要求通过条件筛选选择到一个适合自己的老师，自行预约，单线联系。本网站只是一个第三方平台，为老师找兼职，为学生找老师。
						</p>
					</div>
				</div>
			</div> -->
		</div>
	</section>

	<section class="footer" id="About Us">
		<h2 class="text-center">THANKS FOR VISITING US</h2>
		<hr>
		<div class="container">
			<div class="row">
				<div class="col-md-4  col-md-offset-4">
					<div class="contact-info">
						<div class="phone">
							<i class="glyphicon glyphicon-phone-alt"></i>
							<p class="p4">+00 1010101010</p>
						</div>
						<div class="email-info">
							<i class="glyphicon glyphicon-envelope"></i>
							<p class="p4">469902XXX@qq.com </p>
						</div>
					</div>
				</div><!-- col -->


			</div><!-- row -->
		</div><!-- container -->
		<hr>
		<div class="copyright">
			<p>Copyright &copy; 2018. </p>
		</div>
	</section>
	<!-- /Footer Section -->
	<!-- Back To Top -->
	<a href="#0" class="cd-top">Top</a>
	<!-- /Back To Top -->
	<!-- js files -->
	<script src="students/js/jquery.min.js"></script>
	<script src="students/js/bootstrap.min.js"></script>
	<script src="students/js/SmoothScroll.min.js"></script>
	<!-- js files for gallery -->
	<script src="students/js/chromagallery.pkgd.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function () {
			$(".mygallery").chromaGallery();
		});
	</script>
	<!-- /js files for gallery -->
	<!-- Back To Top -->
	<script src="students/js/backtotop.js"></script>
	<!-- /Back To Top -->
	<script>
		$(document).ready(function () {
			// Add smooth scrolling to all links in navbar + footer link
			$(".navbar a, footer a[href='#myPage']").on('click', function (event) {

				// Store hash
				var hash = this.hash;

				// Using jQuery's animate() method to add smooth page scroll
				// The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
				$('html, body').animate({
					scrollTop: $(hash).offset().top
				}, 900, function () {

					// Add hash (#) to URL when done scrolling (default click behavior)
					window.location.hash = hash;
				});
			});
		})
	</script>
	<script>
		$(window).scroll(function () {
			$(".slideanim").each(function () {
				var pos = $(this).offset().top;

				var winTop = $(window).scrollTop();
				if (pos < winTop + 600) {
					$(this).addClass("slide");
				}
			});
		});
	</script>
	<!-- /js files -->
</body>

</html>